package org.langke.apm;

import java.text.MessageFormat;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        String message = MessageFormat.format("hello {0} {1} {2}", "lee","world",1.1);
        System.out.println( "Hello World!" +message);
        System.out.println(String.format("%s %s ",1.2,null));
        System.out.println("复利计算："+new App().calculate(100f,1));
    }

    float interest=0;
    private float calculate(float init,int year){
        if(year==5){
            interest = init*0.03f;
            init += interest;
            return  init;
        }else{
            year++;
            return (calculate(init,year));
        }
    }
}
